@extends('home.pc.public.public')

@section('main')
    <div class="miya_search">
        <div class="miya_search_left">
            <div class="miya_template_left_box">
                <h3 class="miya_template_left_box_title">{{ $pageLabels['about'] }}</h3>
                <ul class="miya_template_left_box_ul">
                    @foreach($pages['about'] as $value)
                        <li><a href="{{ route('page',['about',$value['id']]) }}">{{ $value['name'] }}</a></li>
                    @endforeach
                </ul>
            </div>
            <div class="miya_template_left_box">
                <h3 class="miya_template_left_box_title">产品中心</h3>
                <ul class="miya_template_left_box_ul">
                    @foreach($sorts['product'] as $value)
                        <li><a href="{{ route('sort',['product',$value['id']]) }}">{{ $value['name'] }}</a></li>
                    @endforeach
                </ul>
            </div>
            <div class="miya_template_left_box">
                <h3 class="miya_template_left_box_title">新闻中心</h3>
                <ul class="miya_template_left_box_ul">
                    @foreach($sorts['new'] as $value)
                        <li><a href="{{ route('sort',['new',$value['id']]) }}">{{ $value['name'] }}</a></li>
                    @endforeach
                </ul>
            </div>
            <div class="miya_template_left_box">
                <h3 class="miya_template_left_box_title">案例中心</h3>
                <ul class="miya_template_left_box_ul">
                    @foreach($sorts['case'] as $value)
                        <li><a href="{{ route('sort',['case',$value['id']]) }}">{{ $value['name'] }}</a></li>
                    @endforeach
                </ul>
            </div>
            @include('home.pc.public.left')
        </div>
        <div class="miya_search_right frame_box">
            <h3 class="miya_search_right_title"><span>{{ $key }}</span> 搜索结果</h3>
            @include('home.pc.public.frame')
            <form action="{{ route('search') }}" class="miya_search_right_form">
                <input type="text" name="key" placeholder="请输入搜索内容" value="{{ $key or '' }}">
                <button></button>
                <div class="clearboth"></div>
                @foreach($chunks as $key => $value)
                    <label for="{{ $key }}">
                        @if(!empty($checks))
                            <input id="{{ $key }}" type="checkbox" name="chunk[]"
                                   {{ array_search($key,$checks)!==false?'checked':'' }} value="{{ $key }}">{{ $value }}
                        @else
                            <input id="{{ $key }}" type="checkbox" name="chunk[]" checked
                                   value="{{ $key }}">{{ $value }}
                        @endif
                    </label>
                @endforeach
                <div class="clearboth"></div>
            </form>
            <div class="miya_search_right_search_info">
                @if(!empty($searchinfos))
                    @foreach($searchinfos as $key => $searchchunkinfos)
                        <h3>{{ $key }}</h3>
                        <ul>
                            @foreach($searchchunkinfos as $value)
                                <li>
                                    <a href="{{ route('info',[$value['chunk'],$value['id']]) }}">
                                        <h4 class="title">{{ $value['name'] }}</h4>
                                        <p>模块:{{ $value['chunk_name'] }} 分类:{{ $value['sort'] }}
                                            访问量:{{ $value['page_view'] }}
                                            创建时间:{{ $value['time'] }}</p>
                                        <div class="clearboth"></div>
                                        <div class="simpledescribe">{{ $value['simpledescribe'] }}</div>
                                    </a>
                                </li>
                            @endforeach
                        </ul>
                    @endforeach
                @else
                    未搜索到相关信息!
                @endif
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
@endsection